#
# First, set the generator variable
#

IF(NOT CPACK_GENERATOR)
IF(WIN32)
  FIND_PROGRAM(NSIS_MAKENSIS NAMES makensis
    PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS]
    DOC "Where is makensis.exe located"
    )

  IF(NOT NSIS_MAKENSIS)
    SET(CPACK_GENERATOR ZIP)
  ELSE()
    SET(CPACK_GENERATOR "NSIS;ZIP")
  ENDIF(NOT NSIS_MAKENSIS)
ELSE()
  IF(APPLE)
    SET(CPACK_GENERATOR DragNDrop)
  ELSE()
    SET(CPACK_GENERATOR TGZ)
  ENDIF()
ENDIF()
ENDIF(NOT CPACK_GENERATOR)

# include required mfc libraries
INCLUDE(InstallRequiredSystemLibraries)

SET(CPACK_PACKAGE_NAME "MITK")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MITK is a medical image processing tool")
SET(CPACK_PACKAGE_VENDOR "German Cancer Research Center (DKFZ)")
SET(CPACK_CREATE_DESKTOP_LINKS "ExtApp")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/MITKCopyright.txt")
SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/MITKCopyright.txt")
SET(CPACK_PACKAGE_VERSION_MAJOR "${MITK_VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${MITK_VERSION_MINOR}")
# append revision number if available
IF(SVN_INFO_WC_REVISION)
  SET(CPACK_PACKAGE_VERSION_PATCH "${MITK_VERSION_PATCH}_r${SVN_INFO_WC_REVISION}")
ELSE(SVN_INFO_WC_REVISION)
  SET(CPACK_PACKAGE_VERSION_PATCH "${MITK_VERSION_PATCH}")
ENDIF(SVN_INFO_WC_REVISION)



